<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Mall/v_good_stytem.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/v_good_stytem.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'goodid',
        footer: 'Foots',
        cnName: '分销商品',
        name: 'v_good_stytem',
        url: '/v_good_stytem/',
        sortName: '',
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: { goodname: '', attend: '', distributorCode: '' },
      searchFormOptions: [
        [
          { title: '商品名称', field: 'goodname', type: 'like', colSize: 4 },
          {
            title: '分销设置',
            field: 'attend',
            type: 'select',

            data: [
              { key: 0, value: '不参与' },
              { key: 1, value: '参与' },
            ],
            colSize: 4,
          },
          {
            title: "分销商",
            field: "distributorCode",
            type: "select",
            dataKey: "distributorList",
          },
        ],
      ],
      columns: [
        {
          field: 'goodname',
          title: '商品名称',
          type: 'string',
          width: 220,
          align: 'left',
        },
        {
          field: 'goodpic',
          title: '图片',
          type: 'imgupgrade',
          width: 220,
          align: 'left',
        },
        {
          field: 'preferentialPrice',
          title: '优惠价',
          type: 'decimal',
          width: 90,
          align: 'left',
        },
        {
          field: 'attend',
          title: '分销设置',
          bind: {
            data: [
              { key: 0, value: '不参与' },
              { key: 1, value: '参与' },
            ],
          },
          type: 'int',
          width: 90,
          align: 'left',
          sortable: true,
        },
        // {
        //   field: 'commissionRules',
        //   title: '佣金规则',
        //   bind: {
        //     data: [
        //       { key: 0, value: '默认规则' },
        //       { key: 1, value: '独立规则' },
        //       { key: 1, value: '批量规则' },
        //     ],
        //   },
        //   type: 'int',
        //   width: 90,
        //   align: 'left',
        // },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
